import request from '@/utils/request'

export default {

  //根据医院编号、科室编号和工作日期，查询排班详细信息
  getDetailsSchedule(hoscode,depcode,workDate){
    return request({
      url: `/admin/hospital/schedule/getScheduleDetails/${hoscode}/${depcode}/${workDate}`,
      method: 'Get'
    })
  },


  //查询医院排班规则数据
  getScheduleRule(page, limit, hoscode, depcode) {
    return request({
      url: `/admin/hospital/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method: 'Get'
    })
  },

  //查询医院所有科室列表
  getDepartmentListByHoscode(hoscode) {
    return request({
      url: `/admin/hospital/department/getDepartmentList/${hoscode}`,
      method: 'Get'
    })
  },


  //查询医院详情
  getHosDetail(id) {
    return request({
      url: `/admin/hospital/hospitalSet/showHosDetail/${id}`,
      method: 'Get'
    })
  },


  //更新医院上线状态
  updateHospStatus(id, status) {
    return request({
      url: `/admin/hospital/hospitalSet/updateHospStatus/${id}/${status}`,
      method: 'Patch'
    })
  },

  //根据数据字典id查询子数据列表
  findChildData(id) {
    return request({
      url: `/admin/cmn/dict/findChildData/${id}`,
      method: 'GET'
    })
  },

  //根据dictCode查询所有的子节点（所有省）
  findByDictCode(dictCode) {
    return request({
      url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
      method: 'GET'
    })
  },
  //医院列表
  getHospList(page, limit, searchObj) {
    return request({
      url: `/admin/hospital/hospitalSet/list/${page}/${limit}`,
      method: 'GET',
      params: searchObj
    })
  },


}
